module.exports = {
    TABLE_NICK_NAME: '课程管理表', // 表的昵称
    TABLE_DESC: '管理课程的基本信息', // 表的描述
    course_name: {"type":"input","attr":{"type":"text"},"label":"课程名称","rule":{"NotNull":true}},
    course_code: {
        type: "input",
        attr: { type: "text", maxlength: "10" },
        label: "课程代码",
        desc: "输入课程的唯一代码",
        unique: true,
        rule: { NotNull: true, Pattern: "^[A-Za-z0-9]+$" }
    },
    instructor_name: {
        type: "input",
        attr: { type: "text", maxlength: "30" },
        label: "授课教师",
        desc: "输入授课教师的姓名",
        rule: { NotNull: true }
    },
    credits: {
        type: "input",
        attr: { type: "number", min: 1, max: 10 },
        label: "学分",
        desc: "输入课程学分（1-10）",
        rule: { NotNull: true, Min: 1, Max: 10 }
    },
    semester: {
        type: "select",
        options: [
            { value: "2024春季", label: "2024春季" },
            { value: "2024秋季", label: "2024秋季" }
        ],
        label: "学期",
        desc: "选择课程所属的学期",
        rule: { NotNull: true }
    },
    classroom: {
        type: "input",
        attr: { type: "text", maxlength: "10" },
        label: "上课地点",
        desc: "输入上课的教室编号",
        rule: { NotNull: false }
    },
    schedule: {
        type: "input",
        attr: { type: "text", maxlength: "50" },
        label: "时间表",
        desc: "如：周二 8:00-10:00",
        rule: { NotNull: true }
    },
    description: {
        type: "textarea",
        attr: { maxlength: "200" },
        label: "课程描述",
        desc: "简要描述课程内容",
        rule: { NotNull: false }
    },
    status: {
        type: "radio",
        options: [
            { value: "open", label: "开放" },
            { value: "closed", label: "关闭" }
        ],
        label: "状态",
        desc: "设置课程状态",
        rule: { NotNull: true }
    }
};
